package com.guanglan.mapper;

import com.guanglan.entity.SysPermission;
import org.apache.ibatis.annotations.Param;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

@MapperScan
public interface SysPermissionMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysPermission sysPermission);

    int insertSelective(SysPermission sysPermission);

    SysPermission selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysPermission sysPermission);

    int updateByPrimaryKey(SysPermission sysPermission);

    List<SysPermission> selectSysPermissionByUserName(@Param("userName") String userName);

    List<SysPermission> selectParentMenuByUserName(@Param("userName") String userName);

    List<SysPermission> selectChildMenuByPid(@Param("pid") Long pid);

    List<SysPermission> selectSysPermissionsByMenuName(@Param("menuName") String menuName);

    List<SysPermission> getPerms();
}